using System.Collections;
using System.Xml;
using Altova.TypeInfo;
using Altova.Xml;
using Altova.Xml.Meta;
using RDML_v1_2_REC.xs;

namespace RDML_v1_2_REC.rdml
{
	public class rdmlType : TypeBase
	{
		internal class Enumerator : EnumeratorBase
		{
			public override object Current
			{
				get
				{
					return new rdmlType((XmlNode)base.InnerCurrent);
				}
			}

			public Enumerator(IEnumerator inner)
				: base(inner)
			{
			}
		}

		public class MemberAttribute_version
		{
			private TypeBase owner;

			private MemberInfo info;

			public string Value
			{
				get
				{
					return XmlTreeOperations.CastToString(XmlTreeOperations.FindAttribute(owner.Node, info), info);
				}
				set
				{
					XmlTreeOperations.SetValue(owner.Node, info, value);
				}
			}

			public Attribute Info
			{
				get
				{
					return new Attribute(info);
				}
			}

			public MemberAttribute_version(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public bool Exists()
			{
				return owner.GetAttribute(info) != null;
			}

			public void Remove()
			{
				owner.RemoveAttribute(info);
			}
		}

		public class MemberElement_dateMade : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public dateTimeType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public dateTimeType First
			{
				get
				{
					return new dateTimeType(owner.GetElementFirst(info));
				}
			}

			public dateTimeType Last
			{
				get
				{
					return new dateTimeType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_dateMade(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public dateTimeType At(int index)
			{
				return new dateTimeType(owner.GetElementAt(info, index));
			}

			public dateTimeType Append()
			{
				return new dateTimeType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new dateTimeType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_dateUpdated : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public dateTimeType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public dateTimeType First
			{
				get
				{
					return new dateTimeType(owner.GetElementFirst(info));
				}
			}

			public dateTimeType Last
			{
				get
				{
					return new dateTimeType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_dateUpdated(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public dateTimeType At(int index)
			{
				return new dateTimeType(owner.GetElementAt(info, index));
			}

			public dateTimeType Append()
			{
				return new dateTimeType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new dateTimeType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_id : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public rdmlIdType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public rdmlIdType First
			{
				get
				{
					return new rdmlIdType(owner.GetElementFirst(info));
				}
			}

			public rdmlIdType Last
			{
				get
				{
					return new rdmlIdType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_id(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public rdmlIdType At(int index)
			{
				return new rdmlIdType(owner.GetElementAt(info, index));
			}

			public rdmlIdType Append()
			{
				return new rdmlIdType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new rdmlIdType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_experimenter : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public experimenterType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public experimenterType First
			{
				get
				{
					return new experimenterType(owner.GetElementFirst(info));
				}
			}

			public experimenterType Last
			{
				get
				{
					return new experimenterType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_experimenter(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public experimenterType At(int index)
			{
				return new experimenterType(owner.GetElementAt(info, index));
			}

			public experimenterType Append()
			{
				return new experimenterType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new experimenterType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_documentation : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public documentationType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public documentationType First
			{
				get
				{
					return new documentationType(owner.GetElementFirst(info));
				}
			}

			public documentationType Last
			{
				get
				{
					return new documentationType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_documentation(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public documentationType At(int index)
			{
				return new documentationType(owner.GetElementAt(info, index));
			}

			public documentationType Append()
			{
				return new documentationType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new documentationType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_dye : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public dyeType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public dyeType First
			{
				get
				{
					return new dyeType(owner.GetElementFirst(info));
				}
			}

			public dyeType Last
			{
				get
				{
					return new dyeType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_dye(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public dyeType At(int index)
			{
				return new dyeType(owner.GetElementAt(info, index));
			}

			public dyeType Append()
			{
				return new dyeType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new dyeType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_sample : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public sampleType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public sampleType First
			{
				get
				{
					return new sampleType(owner.GetElementFirst(info));
				}
			}

			public sampleType Last
			{
				get
				{
					return new sampleType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_sample(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public sampleType At(int index)
			{
				return new sampleType(owner.GetElementAt(info, index));
			}

			public sampleType Append()
			{
				return new sampleType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new sampleType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_target : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public targetType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public targetType First
			{
				get
				{
					return new targetType(owner.GetElementFirst(info));
				}
			}

			public targetType Last
			{
				get
				{
					return new targetType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_target(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public targetType At(int index)
			{
				return new targetType(owner.GetElementAt(info, index));
			}

			public targetType Append()
			{
				return new targetType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new targetType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_thermalCyclingConditions : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public thermalCyclingConditionsType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public thermalCyclingConditionsType First
			{
				get
				{
					return new thermalCyclingConditionsType(owner.GetElementFirst(info));
				}
			}

			public thermalCyclingConditionsType Last
			{
				get
				{
					return new thermalCyclingConditionsType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_thermalCyclingConditions(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public thermalCyclingConditionsType At(int index)
			{
				return new thermalCyclingConditionsType(owner.GetElementAt(info, index));
			}

			public thermalCyclingConditionsType Append()
			{
				return new thermalCyclingConditionsType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new thermalCyclingConditionsType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public class MemberElement_experiment : IEnumerable
		{
			private TypeBase owner;

			private MemberInfo info;

			public experimentType this[int i]
			{
				get
				{
					return At(i);
				}
			}

			public experimentType First
			{
				get
				{
					return new experimentType(owner.GetElementFirst(info));
				}
			}

			public experimentType Last
			{
				get
				{
					return new experimentType(owner.GetElementLast(info));
				}
			}

			public bool Exists
			{
				get
				{
					return Count > 0;
				}
			}

			public int Count
			{
				get
				{
					return owner.CountElement(info);
				}
			}

			public Element Info
			{
				get
				{
					return new Element(info);
				}
			}

			public MemberElement_experiment(TypeBase owner, MemberInfo info)
			{
				this.owner = owner;
				this.info = info;
			}

			public experimentType At(int index)
			{
				return new experimentType(owner.GetElementAt(info, index));
			}

			public experimentType Append()
			{
				return new experimentType(owner.CreateElement(info));
			}

			public void Remove()
			{
				owner.RemoveElement(info);
			}

			public void RemoveAt(int index)
			{
				owner.RemoveElementAt(info, index);
			}

			public IEnumerator GetEnumerator()
			{
				return new experimentType.Enumerator(XmlTreeOperations.GetElements(owner.Node, info).GetEnumerator());
			}
		}

		public MemberAttribute_version version;

		public MemberElement_dateMade dateMade;

		public MemberElement_dateUpdated dateUpdated;

		public MemberElement_id id;

		public MemberElement_experimenter experimenter;

		public MemberElement_documentation documentation;

		public MemberElement_dye dye;

		public MemberElement_sample sample;

		public MemberElement_target target;

		public MemberElement_thermalCyclingConditions thermalCyclingConditions;

		public MemberElement_experiment experiment;

		public static ComplexType StaticInfo
		{
			get
			{
				return new ComplexType(RDML_v1_2_REC_TypeInfo.binder.Types[RDML_v1_2_REC_TypeInfo._altova_ti_rdml_altova_rdmlType]);
			}
		}

		public rdmlType(XmlNode init)
			: base(init)
		{
			instantiateMembers();
		}

		private void instantiateMembers()
		{
			version = new MemberAttribute_version(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_version]);
			dateMade = new MemberElement_dateMade(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_dateMade]);
			dateUpdated = new MemberElement_dateUpdated(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_dateUpdated]);
			id = new MemberElement_id(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_id]);
			experimenter = new MemberElement_experimenter(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_experimenter]);
			documentation = new MemberElement_documentation(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_documentation]);
			dye = new MemberElement_dye(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_dye]);
			sample = new MemberElement_sample(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_sample]);
			target = new MemberElement_target(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_target]);
			thermalCyclingConditions = new MemberElement_thermalCyclingConditions(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_thermalCyclingConditions]);
			experiment = new MemberElement_experiment(this, RDML_v1_2_REC_TypeInfo.binder.Members[RDML_v1_2_REC_TypeInfo._altova_mi_rdml_altova_rdmlType_altova_experiment]);
		}
	}
}
